<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script src="../org/angular.min.js"></script>
    <style>
        input[readonly]{
            background: #f0f0f0;
            border: 1px #afafaf;
        }
    </style>
</head>
<body>
<div ng-app="hd" ng-controller="ctrl">
    <!--   <form method="post" action="3.php">
           <input type="text" name="a" readonly="readonly" value="hdphp"><br/>
           <input type="text" name="b" disabled="disabled" value="disabled"><br/>
           <input type="submit">
       </form>-->
    年龄：<input type="text" ng-model="user.age"><br/>
    邮箱：<input type="text" ng-model="user.mail" ng-readonly="user.uid">
</div>


<script>
    var m = angular.module('hd', []);
    m.controller('ctrl', ['$scope', function ($scope) {
        $scope.user = {sex: 2, age: 12, uid: 100, mail: 'aaaaa@qq.com'};
    }]);
</script>

</body>
</html>

